package edu.calvin.djs32.cs214.interpreters.calculator.primitives;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

import edu.calvin.cs214.hobbes2008.IntegerTIR;

public class PowPrimitiveTest {
	@Test
	public void shouldApplyPow() {
	  assertEquals(new IntegerTIR(16), new PowPrimitive().apply(new IntegerTIR(2), new IntegerTIR(4)));
	  assertEquals(new IntegerTIR(-27), new PowPrimitive().apply(new IntegerTIR(-3), new IntegerTIR(3)));
	  assertEquals(new IntegerTIR(8), new PowPrimitive().apply(new IntegerTIR(2), new IntegerTIR(3)));
	}

}
